package mq.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @description: mq消费者到交换机，交换机到队列异常消息记录(MqMessageAbnormal)实体类
 * @author: zk
 * @since: 2022-08-22 13:58:07
 */

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class MqMessageAbnormal implements Serializable {
    private static final long serialVersionUID = -55177723209873588L;
    // 状态:0-发送失败，1-发送成功
    public static final Integer STATUS_FAIL = 0, STATUS_SUCCESS = 1;
    // 1-消费者发送到交换机，2-交换机到队列
    public static final Integer TYPE_EXCHANGE = 1, TYPE_QUEUE = 2;

    /**
     * 主键
     */
    private Long id;
    /**
     * 消息ID(唯一)
     */
    private String messageId;
    /**
     * 消息json字符串
     */
    private String message;
    /**
     * 状态:0-发送失败，1-重发成功
     */
    private Integer status;
    /**
     * 1-消费者发送到交换机，2-交换机到队列
     */
    private Integer type;
    
    private Integer replyCode;
    
    private String replyText;
    /**
     * 原因
     */
    private String cause;
    /**
     * 交换机
     */
    private String exchange;
    /**
     * 路由键
     */
    private String routingKey;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 更新时间
     */
    private Date updateTime;

}

